<? if (@$this->sess->userid != ""): ?>
    <div class="row">
        <div class="span12">
            <p>Selamat Datang,</p>
            <p>Alumni Wikusama .......</p>
        </div>
    </div>
<? else: ?>
    <div align="center">1 ---> <strong style="font-size:16pt" >2</strong> ---> 3</div>
    <div id="message"  align="center">
        <font class="strerr"><?=@$err->tempatlahir?> <?=@$err->status?>
         <?=@$err->email?>  <?=@$err->notelp?>  <?=@$err->alamat?>  <?=@$err->province_id?>
          <?=@$err->city_id?>  <?=@$err->kodepos?><?=@$err->sendmail?>
        </font>
    </div>

    <form method="post" action="<?= base_url() ?>register/inputdata" >
        <div style="background-color:yellow;">
            <table>
                <tr>
                    <td><strong>ID Alumni</strong></td>
                    <td> : <?= $this->sess->id_alumni ?></td>
                </tr>
                <tr>
                    <td><strong>NIS</strong></td>
                    <td> : <?= $this->sess->nis ?></td>
                </tr>
                <tr>
                    <td><strong>Nama Lengkap</strong></td>
                    <td> : <?= $this->sess->fullname ?></td>
                </tr>
                <tr>
                    <td><strong>Tanggal Lahir</strong></td>
                    <td> : <?= $this->sess->birth_date ?></td>
                </tr>
            </table>
        </div>
        <br/><br/>

        <table>
            <tr>
                <td width="30%"><label>Tempat Lahir<strong style="color:red">*</strong></label></td>
                <td><input type="text" name="txtTempatLahir" id="txtTempatLahir" placeholder="Tempat Lahir" value="<?=@$this->sess->tempatlahir == '' ? @$alumni->tempatlahir : @$this->sess->tempatlahir?>"/>
</td>
            </tr>
            <tr>
                <td><label>Status<strong style="color:red">*</strong></label></td>
                <td>
                    <select id="ddStatus" name="ddStatus">
                        <option value="">Pilih</option>
                        <? $status = $alumni->status != '' ? $alumni->status : $this->sess->status ?>
                        <option value="L" <?= $status == 'L' ? ' selected="selected"' : "" ?> >Lajang</option>
                        <option value="M" <?= $status == 'M'? ' selected="selected"' : "" ?> >Menikah</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><label>Email<strong style="color:red">*</strong></label></td>
                <td><input type="text" name="txtEmail" id="txtEmail" placeholder="Email" value="<?=@$alumni->email != '' ? @$alumni->email : @$this->sess->email ?>"/></td>
            </tr>
            <tr>
                <td><label>No. Telp</label></td>
                <td><input type="text" name="txtNoTelp" id="txtNoTelp" placeholder="Nomor Telepon" value="<?=@$this->sess->notelp == '' ? @$alumni->notelp : @$this->sess->notelp ?>"/></td>
            </tr>
            <tr>
                <td><label>Alamat Tinggal<strong style="color:red">*</strong></label></td>
                <td><input type="text" name="txtAlamat" id="txtAlamat" placeholder="Alamat Tinggal" value="<?=@$this->sess->alamat == '' ? @$alumni->alamat : @$this->sess->alamat ?>"/></td>
            </tr>

            <tr>
                <td><label>Propinsi<strong style="color:red">*</strong></label></td>
                <td>
                <script>
                 $(document).ready(function () {
                    $('#ddPropinsi').change(function (){
                      $('#ddKota').find('option').remove();
                      $.getJSON("<?= base_url() ?>register/getkotajson?pid="+$('#ddPropinsi').val(), function(data){
                          $.each(data, function(index, city) {
                            $('#ddKota').append('<option value="'+city.city_id+'">'+city.city_nama+'</option>');
                          });
                        });
                    });
                 });
                </script>

                    <select name="ddPropinsi" id="ddPropinsi">
                        <option value="">Pilih Propinsi</option>
                        <?
                        $province = @$alumni->province_id != '' ? @$alumni->province_id : @$this->sess->province_id ;
                        foreach (getPropinsi() as $p =>$v) { ?>

                        <option <?= $province == $v->province_id ? ' selected="selected"' : "" ?> value="<?= @$v->province_id ?>"><?= $v->province_nama ?></option>
                        <? } ?>
                    </select>
                    &nbsp;Kota<strong style="color:red">*</strong>
                    &nbsp;
                    <select name="ddKota" id="ddKota">
                        <option value="">Pilih Kota/Kabupaten</option>
                        <?
                        $city = @$alumni->city_id != '' ? @$alumni->city_id : @$this->sess->city_id ;;
                        if($province !=''){
                            foreach (getKabupaten($province) as $k => $v){
                        ?>
                        <option <?= $city == $v->city_id ? ' selected="selected"' : '' ?> value="<?= $v->city_id ?>"><?= $v->city_nama ?></option>

                        <?
                            }
                        }
                        ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td><label>Kode Pos<strong style="color:red">*</strong></label></td>
                <td><input type="text" name="txtKodePos" id="txtKodePos" value="<?= @$alumni->kodepos != '' ? @$alumni->kodepos : @$this->sess->kodepos ?>"/></td>
            </tr>
        </table>
        <input type="button" onclick="javascript:window.location='<?= base_url() ?>register';" value="Back"/>
        <input type="submit" value="Next"/>
    </form>
<? endif; ?>